Skip to content

chore: add blas and extended keywords to nancount packages in blas/ext/base#12120

Merged
kgryte merged 4 commits into
developfrom
philipp/drift-blas-ext-base-2026-05-14
May 14, 2026
Merged

chore: add blas and extended keywords to nancount packages in blas/ext/base#12120
kgryte merged 4 commits into
developfrom
philipp/drift-blas-ext-base-2026-05-14

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • adds the missing blas and extended keywords to the keywords array in package.json for four nancount packages in @stdlib/blas/ext/base. Each keyword is inserted at index 6 (after math) to match the position used by all 28 sibling nan* packages in the same namespace.

Namespace summary

  • Namespace: @stdlib/blas/ext/base
  • Members analyzed: 200 (no autogenerated packages excluded)
  • Features with clear majority (≥75%): package.json top-level keys, os, engines, directories, license, README section ordering (Usage / Notes / Examples), file tree (README.md, package.json, lib/index.js, lib/main.js, lib/ndarray.js, docs/repl.txt, docs/types/index.d.ts, docs/types/test.ts, examples/index.js, test/test.js, test/test.ndarray.js, benchmark/benchmark.js, benchmark/benchmark.ndarray.js), and the stdlib / blas / extended / strided / array / math / mathematics / stdmath keywords.
  • Features without clear majority (excluded from drift analysis): browser field (71%), gypfile field (71%), __stdlib__ value shape ({} 53.5% vs {"wasm": false} 36% vs missing 10.5%), full README heading sequence (no single sequence reaches 75%).

Per outlier package

blas/ext/base/dnancount

Adds the missing blas and extended keywords to package.json. Operates on a double-precision (Float64) strided array, matching siblings dnansum, dnannsum, and dnanasum. The blas keyword is present in 196/200 (98%) of sibling packages and extended in 176/200 (88%, 100% within the nan* family).

blas/ext/base/snancount

Adds the missing blas and extended keywords to package.json. Operates on a single-precision (Float32) strided array, matching siblings snansum, snansumkbn, and snansumpw. The blas keyword is present in 196/200 (98%) of sibling packages and extended in 176/200 (88%, 100% within the nan* family).

blas/ext/base/gnancount

Adds the missing blas and extended keywords to package.json. Provides the generic counterpart for arbitrary strided arrays, matching siblings gnansum, gnansumkbn, and gnannsum. The blas keyword is present in 196/200 (98%) of sibling packages and extended in 176/200 (88%, 100% within the nan* family).

blas/ext/base/znancount

Adds the missing blas and extended keywords to package.json. Operates on a double-precision complex (Complex128) strided array, matching siblings dnannsum and dnanasum; added recently in PR #11514 (April 2026). The blas keyword is present in 196/200 (98%) of sibling packages and extended in 176/200 (88%, 100% within the nan* family).

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

  • None.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

Each correction was filtered through:

  • Structural extraction of all 200 packages (file tree, package.json shape, README section list, manifest shape, test/benchmark/example file naming).
  • Three-agent drift validation on each outlier:
    • Semantic review: confirmed each nancount package is a BLAS-extended strided-array operation with the same native-build layout (gypfile, src/, include/, manifest.json) as the nan*sum siblings — no semantic reason to omit the keywords.
    • Cross-reference: verified no test, example, benchmark, README, or tooling under tools/ or _tools/ depends on the keyword list. Confirmed both new values satisfy the keywords lint regex defined in _tools/package-json/schema/lib/schema.json and do not duplicate existing entries.
    • Structural review: confirmed the insertion index (6, after math) is uniform across dnansum, gnansum, snansum, dnannsum, dnanasum.

Deliberately excluded

  • benchmark/benchmark.js drift. 23 packages lack the canonical benchmark.js. All 23 are sort variants (dsort*, gsort*, ssort*) carrying scenario-specific benchmark suites (benchmark.unsorted_random.js, benchmark.sorted_random.js, etc.); the deviation reflects the algorithmic need to benchmark across input distributions and is intentional.
  • __stdlib__ field absence. 21 packages (the *index-of* family plus ndarray and wasm) lack a top-level __stdlib__ field. Within the 179 packages that do carry it, the value is split between {} (60%) and {"wasm": false} (40%) with no clear correlation to gypfile, so there is no unambiguous value to apply.
  • math/mathematics/stdmath keywords. 20 packages omit these (the *index-of* family plus gjoin-between). These are search and string operations rather than mathematical operations; the omission is consistent with the keyword's semantic meaning.
  • docs/repl.txt, lib/main.js, lib/ndarray.js, test/test.ndarray.js absences. Missing only from ndarray and wasm, which are architectural meta-packages re-exporting variants and legitimately differ.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance.

This PR was produced by an automated cross-package API drift detection routine running under Claude Code. The routine extracts structural features from every package in a randomly selected stdlib namespace, identifies the majority pattern per feature, and proposes mechanical corrections to outliers. Three independent validation agents reviewed the proposed change for semantic appropriateness, downstream dependencies, and structural correctness before any file was modified. All edits and commit messages in this PR were generated by the routine; a maintainer should review before promoting from draft.


@stdlib-js/reviewers


Generated by Claude Code

claude added 4 commits May 14, 2026 00:16
The `keywords` array previously omitted `blas` and `extended`, both of
which appear in 28/28 sibling `nan*` packages in `blas/ext/base` (e.g.
`dnansum`, `dnannsum`, `dnanasum`). Insert them at index 6 to match the
sibling pattern (after `math`, before the operation-specific keyword).
The `keywords` array previously omitted `blas` and `extended`, both of
which appear in 28/28 sibling `nan*` packages in `blas/ext/base` (e.g.
`snansum`, `snansumkbn`, `snansumpw`). Insert them at index 6 to match
the sibling pattern (after `math`, before the operation-specific
keyword).
The `keywords` array previously omitted `blas` and `extended`, both of
which appear in 28/28 sibling `nan*` packages in `blas/ext/base` (e.g.
`gnansum`, `gnansumkbn`, `gnannsum`). Insert them at index 6 to match
the sibling pattern (after `math`, before the operation-specific
keyword).
The `keywords` array previously omitted `blas` and `extended`, both of
which appear in 28/28 sibling `nan*` packages in `blas/ext/base` (e.g.
`dnansum`, `dnannsum`, `dnanasum`). Insert them at index 6 to match the
sibling pattern (after `math`, before the operation-specific keyword).
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label May 14, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/dnancount $\color{green}360/360$
$\color{green}+100.00%$
$\color{green}18/18$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}360/360$
$\color{green}+100.00%$
blas/ext/base/gnancount $\color{green}262/262$
$\color{green}+100.00%$
$\color{green}25/25$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}262/262$
$\color{green}+100.00%$
blas/ext/base/snancount $\color{green}360/360$
$\color{green}+100.00%$
$\color{green}18/18$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}360/360$
$\color{green}+100.00%$
blas/ext/base/znancount $\color{green}367/367$
$\color{green}+100.00%$
$\color{green}19/19$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}367/367$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@Planeshifter Planeshifter marked this pull request as ready for review May 14, 2026 04:47
@Planeshifter Planeshifter requested review from a team and kgryte May 14, 2026 04:47
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 14, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label May 14, 2026
@kgryte kgryte merged commit 00769bf into develop May 14, 2026
54 checks passed
@kgryte kgryte deleted the philipp/drift-blas-ext-base-2026-05-14 branch May 14, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants